/**
 * 2015-5-31下午7:48:09
 */
package com.sondon.mayi.yicache;

/**
 * @ClassName: TestCache
 * @package com.sondon.mayi.yicache
 * @author mayi
 * @date 2015-5-31 下午7:48:09
 * @Description: TODO(测试缓存运行性能)
 * @version 1.0
 *
 */
public class TestCache {

	public static void main(String[] args) {
		YiMemoryCache<String, Object> myCache=new YiMemoryCache<String, Object>(1024);
//		for(int i=0; i<2000000;i++){
//			myCache.cache("key"+i,new TestCache().new Person("name"+i, "age"+i));
//		}
//		
		int i=0;
		while(true){
			System.out.println("i   :"+i);
			myCache.cache("key"+i,new TestCache().new Person("name"+i, "age"+i));
			i++;
		}
//		System.out.println(myCache.containsKey("key"+100));
	}

	class Person{
		String name;
		String age;
		
		public Person(String name,String age){
			this.name=name;
			this.age=age;
		}
	}
}
